﻿#if !(EXPERIMENTAL_IL2CPP_PUERTS && ENABLE_IL2CPP)
using System;
using Puerts;

namespace PuertsStaticWrap
{
#pragma warning disable 0219
    public static class UnityEngine_Component_Wrap
    {
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8ConstructorCallback))]
        internal static IntPtr Constructor(IntPtr isolate, IntPtr info, int paramLen, long data)
        {
            try
            {
                {
                    {
                        var result = new UnityEngine.Component();

                        return Puerts.Utils.GetObjectPtr(
                            (int)data,
                            typeof(UnityEngine.Component),
                            result
                        );
                    }
                }
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
            return IntPtr.Zero;
        }

        // ==================== constructor end ====================

        // ==================== methods start ====================
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_GetComponent(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                if (paramLen == 1)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;

                        var result = obj.GetComponent(arg0);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);

                        var result = obj.GetComponent(arg0);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to GetComponent");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_TryGetComponent(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    ;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    ;
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;
                        argobj1 =
                            argobj1 != null
                                ? argobj1
                                : StaticTranslate<UnityEngine.Component>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value1,
                                    true
                                );
                        UnityEngine.Component arg1 = (UnityEngine.Component)argobj1;

                        var result = obj.TryGetComponent(arg0, out arg1);

                        StaticTranslate<UnityEngine.Component>.Set(
                            (int)data,
                            isolate,
                            Puerts.NativeValueApi.SetValueToByRefArgument,
                            v8Value1,
                            arg1
                        );
                        Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
                    }
                }
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_GetComponentInChildren(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                if (paramLen == 2)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Boolean,
                            typeof(bool),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;
                        bool arg1 = (bool)PuertsDLL.GetBooleanFromValue(isolate, v8Value1, false);

                        var result = obj.GetComponentInChildren(arg0, arg1);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                if (paramLen == 1)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;

                        var result = obj.GetComponentInChildren(arg0);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "invalid arguments to GetComponentInChildren"
                );
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_GetComponentsInChildren(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                if (paramLen == 2)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Boolean,
                            typeof(bool),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;
                        bool arg1 = (bool)PuertsDLL.GetBooleanFromValue(isolate, v8Value1, false);

                        var result = obj.GetComponentsInChildren(arg0, arg1);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                if (paramLen == 1)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;

                        var result = obj.GetComponentsInChildren(arg0);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "invalid arguments to GetComponentsInChildren"
                );
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_GetComponentInParent(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                if (paramLen == 2)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Boolean,
                            typeof(bool),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;
                        bool arg1 = (bool)PuertsDLL.GetBooleanFromValue(isolate, v8Value1, false);

                        var result = obj.GetComponentInParent(arg0, arg1);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                if (paramLen == 1)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;

                        var result = obj.GetComponentInParent(arg0);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "invalid arguments to GetComponentInParent"
                );
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_GetComponentsInParent(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                if (paramLen == 2)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Boolean,
                            typeof(bool),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;
                        bool arg1 = (bool)PuertsDLL.GetBooleanFromValue(isolate, v8Value1, false);

                        var result = obj.GetComponentsInParent(arg0, arg1);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                if (paramLen == 1)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;

                        var result = obj.GetComponentsInParent(arg0);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "invalid arguments to GetComponentsInParent"
                );
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_GetComponents(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                if (paramLen == 1)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;

                        var result = obj.GetComponents(arg0);

                        Puerts.ResultHelper.Set((int)data, isolate, info, result);
                        return;
                    }
                }
                if (paramLen == 2)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Type),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.NativeObject,
                            typeof(System.Collections.Generic.List<UnityEngine.Component>),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        argobj0 =
                            argobj0 != null
                                ? argobj0
                                : StaticTranslate<System.Type>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value0,
                                    false
                                );
                        System.Type arg0 = (System.Type)argobj0;
                        argobj1 =
                            argobj1 != null
                                ? argobj1
                                : StaticTranslate<System.Collections.Generic.List<UnityEngine.Component>>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value1,
                                    false
                                );
                        System.Collections.Generic.List<UnityEngine.Component> arg1 =
                            (System.Collections.Generic.List<UnityEngine.Component>)argobj1;

                        obj.GetComponents(arg0, arg1);

                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to GetComponents");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_CompareTag(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    ;
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);

                        var result = obj.CompareTag(arg0);

                        Puerts.PuertsDLL.ReturnBoolean(isolate, info, result);
                    }
                }
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_SendMessageUpwards(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                if (paramLen == 3)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    IntPtr v8Value2 = PuertsDLL.GetArgumentValue(info, 2);
                    object argobj2 = null;
                    JsValueType argType2 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Any,
                            typeof(System.Object),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(UnityEngine.SendMessageOptions),
                            false,
                            false,
                            v8Value2,
                            ref argobj2,
                            ref argType2
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);
                        argobj1 =
                            argobj1 != null
                                ? argobj1
                                : StaticTranslate<System.Object>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value1,
                                    false
                                );
                        System.Object arg1 = (System.Object)argobj1;
                        UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)
                            StaticTranslate<int>.Get(
                                (int)data,
                                isolate,
                                Puerts.NativeValueApi.GetValueFromArgument,
                                v8Value2,
                                false
                            );

                        obj.SendMessageUpwards(arg0, arg1, arg2);

                        return;
                    }
                }
                if (paramLen == 2)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Any,
                            typeof(System.Object),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);
                        argobj1 =
                            argobj1 != null
                                ? argobj1
                                : StaticTranslate<System.Object>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value1,
                                    false
                                );
                        System.Object arg1 = (System.Object)argobj1;

                        obj.SendMessageUpwards(arg0, arg1);

                        return;
                    }
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(UnityEngine.SendMessageOptions),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);
                        UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)
                            StaticTranslate<int>.Get(
                                (int)data,
                                isolate,
                                Puerts.NativeValueApi.GetValueFromArgument,
                                v8Value1,
                                false
                            );

                        obj.SendMessageUpwards(arg0, arg1);

                        return;
                    }
                }
                if (paramLen == 1)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);

                        obj.SendMessageUpwards(arg0);

                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to SendMessageUpwards");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_SendMessage(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                if (paramLen == 2)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Any,
                            typeof(System.Object),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);
                        argobj1 =
                            argobj1 != null
                                ? argobj1
                                : StaticTranslate<System.Object>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value1,
                                    false
                                );
                        System.Object arg1 = (System.Object)argobj1;

                        obj.SendMessage(arg0, arg1);

                        return;
                    }
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(UnityEngine.SendMessageOptions),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);
                        UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)
                            StaticTranslate<int>.Get(
                                (int)data,
                                isolate,
                                Puerts.NativeValueApi.GetValueFromArgument,
                                v8Value1,
                                false
                            );

                        obj.SendMessage(arg0, arg1);

                        return;
                    }
                }
                if (paramLen == 1)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);

                        obj.SendMessage(arg0);

                        return;
                    }
                }
                if (paramLen == 3)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    IntPtr v8Value2 = PuertsDLL.GetArgumentValue(info, 2);
                    object argobj2 = null;
                    JsValueType argType2 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Any,
                            typeof(System.Object),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(UnityEngine.SendMessageOptions),
                            false,
                            false,
                            v8Value2,
                            ref argobj2,
                            ref argType2
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);
                        argobj1 =
                            argobj1 != null
                                ? argobj1
                                : StaticTranslate<System.Object>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value1,
                                    false
                                );
                        System.Object arg1 = (System.Object)argobj1;
                        UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)
                            StaticTranslate<int>.Get(
                                (int)data,
                                isolate,
                                Puerts.NativeValueApi.GetValueFromArgument,
                                v8Value2,
                                false
                            );

                        obj.SendMessage(arg0, arg1, arg2);

                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to SendMessage");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void M_BroadcastMessage(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;

                if (paramLen == 3)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    IntPtr v8Value2 = PuertsDLL.GetArgumentValue(info, 2);
                    object argobj2 = null;
                    JsValueType argType2 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Any,
                            typeof(System.Object),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(UnityEngine.SendMessageOptions),
                            false,
                            false,
                            v8Value2,
                            ref argobj2,
                            ref argType2
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);
                        argobj1 =
                            argobj1 != null
                                ? argobj1
                                : StaticTranslate<System.Object>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value1,
                                    false
                                );
                        System.Object arg1 = (System.Object)argobj1;
                        UnityEngine.SendMessageOptions arg2 = (UnityEngine.SendMessageOptions)
                            StaticTranslate<int>.Get(
                                (int)data,
                                isolate,
                                Puerts.NativeValueApi.GetValueFromArgument,
                                v8Value2,
                                false
                            );

                        obj.BroadcastMessage(arg0, arg1, arg2);

                        return;
                    }
                }
                if (paramLen == 2)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    IntPtr v8Value1 = PuertsDLL.GetArgumentValue(info, 1);
                    object argobj1 = null;
                    JsValueType argType1 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Any,
                            typeof(System.Object),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);
                        argobj1 =
                            argobj1 != null
                                ? argobj1
                                : StaticTranslate<System.Object>.Get(
                                    (int)data,
                                    isolate,
                                    NativeValueApi.GetValueFromArgument,
                                    v8Value1,
                                    false
                                );
                        System.Object arg1 = (System.Object)argobj1;

                        obj.BroadcastMessage(arg0, arg1);

                        return;
                    }
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                        && ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.Number,
                            typeof(UnityEngine.SendMessageOptions),
                            false,
                            false,
                            v8Value1,
                            ref argobj1,
                            ref argType1
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);
                        UnityEngine.SendMessageOptions arg1 = (UnityEngine.SendMessageOptions)
                            StaticTranslate<int>.Get(
                                (int)data,
                                isolate,
                                Puerts.NativeValueApi.GetValueFromArgument,
                                v8Value1,
                                false
                            );

                        obj.BroadcastMessage(arg0, arg1);

                        return;
                    }
                }
                if (paramLen == 1)
                {
                    IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                    object argobj0 = null;
                    JsValueType argType0 = JsValueType.Invalid;
                    if (
                        ArgHelper.IsMatch(
                            (int)data,
                            isolate,
                            Puerts.JsValueType.NullOrUndefined | Puerts.JsValueType.String,
                            typeof(string),
                            false,
                            false,
                            v8Value0,
                            ref argobj0,
                            ref argType0
                        )
                    )
                    {
                        string arg0 = (string)
                            PuertsDLL.GetStringFromValue(isolate, v8Value0, false);

                        obj.BroadcastMessage(arg0);

                        return;
                    }
                }
                Puerts.PuertsDLL.ThrowException(isolate, "invalid arguments to BroadcastMessage");
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        // ==================== methods end ====================

        // ==================== properties start ====================
        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void G_transform(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;
                var result = obj.transform;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void G_gameObject(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;
                var result = obj.gameObject;
                Puerts.ResultHelper.Set((int)data, isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void G_tag(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;
                var result = obj.tag;
                Puerts.PuertsDLL.ReturnString(isolate, info, result);
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }

        [Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
        internal static void S_tag(
            IntPtr isolate,
            IntPtr info,
            IntPtr self,
            int paramLen,
            long data
        )
        {
            try
            {
                var obj = Puerts.Utils.GetSelf((int)data, self) as UnityEngine.Component;
                IntPtr v8Value0 = PuertsDLL.GetArgumentValue(info, 0);
                object argobj0 = null;
                string arg0 = (string)PuertsDLL.GetStringFromValue(isolate, v8Value0, false);
                obj.tag = arg0;
            }
            catch (Exception e)
            {
                Puerts.PuertsDLL.ThrowException(
                    isolate,
                    "c# exception:" + e.Message + ",stack:" + e.StackTrace
                );
            }
        }
        // ==================== properties end ====================
        // ==================== array item get/set start ====================


        // ==================== array item get/set end ====================
        // ==================== operator start ====================
        // ==================== operator end ====================
        // ==================== events start ====================
        // ==================== events end ====================
    }
#pragma warning disable 0219
}
#endif
